.svg on html pageCreated: 2022-09-20
Tags: #fleeting
<img> elementalt attribute.<img> inside an <a> element.:focus).Older browsers doesn't support svg
If you want to support older browsers
Read this link
https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Adding_vector_graphics_to_the_Web#troubleshooting_and_cross-browser_support
.svg file using text editor<svg width="300" height="200">
<rect width="100%" height="100%" fill="green" />
</svg>
Pros
classes and ids to SVG elements and style them with CSS, either within the SVG or wherever you put the CSS style rules for your HTML document. In fact, you can use any SVG presentation attribute as a CSS property.<iframe src="triangle.svg" width="500" height="500" sandbox>
<img src="triangle.png" alt="Triangle with three unequal sides" />
</iframe>
This is definitely not the best method to choose:
iframes do have a fallback mechanism, as you can see, but browsers only display the fallback if they lack support for iframes altogether.